using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace Abs.Core.Models.Room
{
    public enum RoomScheduleField
    {
        RoomId = 0,
        DayId,
        StartTime,
        EndTime
    }//end of public enum RoomScheduleField

    public enum Schedule
    {
        Start = 7,
        End = 21
    }

    public class RoomSchedule
    {
        [Key, Column(Order=0), ForeignKey("Room")]
        public virtual int RoomId { get; set; }
        public virtual Room Room { get; set; }

        [Key, Column(Order = 1), ForeignKey("Day")]
        public virtual int DayId { get; set; }
        public virtual Day Day { get; set; }

        [Required(ErrorMessage = "The start time of the room can be booked is required.")]
        [DataType(DataType.Time)]
        public virtual DateTime StartTime { get; set; }

        [Required(ErrorMessage = "The end time of the room can be booked is required.")]
        [DataType(DataType.Time)]
        public virtual DateTime EndTime { get; set; }
    }//end of public RoomScheduleRepository
}//end of namespace ABS.Models